# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site:  https://gitee.com/autumner/pythoncookbook
@software: PyCharm 
@file: threading_sign_process.py 
@time: 2019/7/31 上午11:50
@note:
单进程多线程
"""

import time
from threading import Thread
import multiprocessing


class CountDownThread(Thread):

    def __init__(self, n):

        super().__init__()
        self.n = n

    def run(self):

        while self.n > 0:

            print('T-minus', self.n)
            self.n -= 1
            time.sleep(5)


c = CountDownThread(5)
p = multiprocessing.Process(target=c.run)
p.start()